from operator import itemgetter
rows={
    "a":1,
    "c":3,
    "b":2,
    "e":5,
    "d":4,
}

print(rows)
print(sorted(rows.items(),key=lambda x:x[1],reverse=True))
print(sorted(rows.items(),key=itemgetter(1)))
x=zip(rows.values(),rows.keys())
sorted(x)
s